<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../../js/angular-1.4.1/angular.js"></script>
</head>
<body ng-app="myApp" ng-controller="myController">
<my-directive></my-directive>
<my-directive></my-directive>
<my-directive></my-directive>
<my-directive></my-directive>

</body>
<script type="application/javascript">
    var app = angular.module("myApp", []);
    app.controller("myController", ["$scope", function ($scope) {
        $scope.name = "mjduan";
    }]);
    app.directive("myDirective", function () {
        return {
            //配置项
            template: "<h1>第一个自定义指令，{{name}}</h1>",
            controller: "myController"
        };
    });
</script>
</html>